+Sun Oct 24 02:56:43 2004 Jonathan Blandford <jrb@redhat.com>
+
+ * docs/tools/widgets.c: Update GtkFileChooserButton doc shot.
+
2004-10-24 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkicontheme.c: Use the new g_key_file api in GLib.
+Sun Oct 24 02:56:43 2004 Jonathan Blandford <jrb@redhat.com>
+
+ * docs/tools/widgets.c: Update GtkFileChooserButton doc shot.
+
2004-10-24 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkicontheme.c: Use the new g_key_file api in GLib.
+Sun Oct 24 02:56:43 2004 Jonathan Blandford <jrb@redhat.com>
+
+ * docs/tools/widgets.c: Update GtkFileChooserButton doc shot.
+
2004-10-24 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkicontheme.c: Use the new g_key_file api in GLib.
+Sun Oct 24 02:56:43 2004 Jonathan Blandford <jrb@redhat.com>
+
+ * docs/tools/widgets.c: Update GtkFileChooserButton doc shot.
+
2004-10-24 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkicontheme.c: Use the new g_key_file api in GLib.
+Sun Oct 24 02:54:36 2004 Jonathan Blandford <jrb@redhat.com>
+
+ * gtk/gtk.types: Add GtkAboutDialog and GtkFileChooserButton
+
+ * gtk/tmpl/GtkFileChooserButton.sgml: Write docs
+
+ * gtk/tmpl/GtkListStore.sgml: Update performance comment now that
+ we use GSequence.
+
+ * gtk/visual_index.xml: Fix up a couple of errors.
+
+ * gtk/images/*png: update
+
2004-10-22 Matthias Clasen <mclasen@redhat.com>
* gtk/gtk-sections.txt: Add new DND functions.
$(top_srcdir)/gtk/stock-icons/stock_media_record_24.png \
$(top_srcdir)/gtk/stock-icons/stock_media_rewind_24.png \
$(top_srcdir)/gtk/stock-icons/stock_media_stop_24.png \
- $(srcdir)/images/font-button.png \
+ $(srcdir)/images/accel-label.png \
$(srcdir)/images/button.png \
$(srcdir)/images/check-button.png \
$(srcdir)/images/color-button.png \
$(srcdir)/images/combo-box-entry.png \
$(srcdir)/images/entry.png \
+ $(srcdir)/images/file-button.png \
+ $(srcdir)/images/font-button.png \
$(srcdir)/images/frame.png \
+ $(srcdir)/images/icon-view.png \
+ $(srcdir)/images/image.png \
$(srcdir)/images/label.png \
$(srcdir)/images/list-and-tree.png \
- $(srcdir)/images/multiline-text.png \
- $(srcdir)/images/panes.png \
- $(srcdir)/images/radio-group.png \
- $(srcdir)/images/separator.png \
- $(srcdir)/images/toggle-button.png \
- $(srcdir)/images/window.png \
- $(srcdir)/images/accel-label.png \
- $(srcdir)/images/file-button.png \
- $(srcdir)/images/icon-view.png \
- $(srcdir)/images/toolbar.png \
$(srcdir)/images/menubar.png \
+ $(srcdir)/images/messagedialog.png \
+ $(srcdir)/images/multiline-text.png \
$(srcdir)/images/notebook.png \
+ $(srcdir)/images/panes.png \
$(srcdir)/images/progressbar.png \
+ $(srcdir)/images/radio-group.png \
+ $(srcdir)/images/scales.png \
$(srcdir)/images/scrolledwindow.png \
+ $(srcdir)/images/separator.png \
$(srcdir)/images/spinbutton.png \
$(srcdir)/images/statusbar.png \
- $(srcdir)/images/image.png \
- $(srcdir)/images/messagedialog.png
+ $(srcdir)/images/toggle-button.png \
+ $(srcdir)/images/toolbar.png \
+ $(srcdir)/images/window.png
# Extra options to supply to gtkdoc-fixref
FIXXREF_OPTIONS=--extra-dir=../gdk-pixbuf/html --extra-dir=../gdk/html
#include <gtk/gtk.h>
+gtk_about_dialog_get_type
gtk_accel_group_get_type
gtk_accel_map_get_type
gtk_accel_label_get_type
gtk_event_box_get_type
gtk_expander_get_type
gtk_file_chooser_get_type
+gtk_file_chooser_button_get_type
gtk_file_chooser_dialog_get_type
gtk_file_chooser_widget_get_type
gtk_file_filter_get_type
only private fields and should not be directly accessed.
</para>
-@parent_instance:
+
+<!-- ##### ARG GtkAboutDialog:artists ##### -->
+<para>
+
+</para>
+
+<!-- ##### ARG GtkAboutDialog:authors ##### -->
+<para>
+
+</para>
+
+<!-- ##### ARG GtkAboutDialog:comments ##### -->
+<para>
+
+</para>
+
+<!-- ##### ARG GtkAboutDialog:copyright ##### -->
+<para>
+
+</para>
+
+<!-- ##### ARG GtkAboutDialog:documenters ##### -->
+<para>
+
+</para>
+
+<!-- ##### ARG GtkAboutDialog:license ##### -->
+<para>
+
+</para>
+
+<!-- ##### ARG GtkAboutDialog:logo ##### -->
+<para>
+
+</para>
+
+<!-- ##### ARG GtkAboutDialog:name ##### -->
+<para>
+
+</para>
+
+<!-- ##### ARG GtkAboutDialog:translator-credits ##### -->
+<para>
+
+</para>
+
+<!-- ##### ARG GtkAboutDialog:version ##### -->
+<para>
+
+</para>
+
+<!-- ##### ARG GtkAboutDialog:website ##### -->
+<para>
+
+</para>
+
+<!-- ##### ARG GtkAboutDialog:website-label ##### -->
+<para>
+
+</para>
+
+<!-- ##### ARG GtkAboutDialog:link-color ##### -->
+<para>
+
+</para>
<!-- ##### FUNCTION gtk_about_dialog_new ##### -->
<para>
@widget:
+<!-- ##### FUNCTION gtk_drag_dest_add_image_targets ##### -->
+<para>
+
+</para>
+
+@widget:
+
+
+<!-- ##### FUNCTION gtk_drag_dest_add_uri_targets ##### -->
+<para>
+
+</para>
+
+@widget:
+
+
<!-- ##### FUNCTION gtk_drag_finish ##### -->
<para>
Informs the drag source that the drop is finished, and
<!-- ##### SECTION Long_Description ##### -->
<para>
#GtkFileChooser is an interface that can be implemented by file
- selection widgets. In GTK+, the main objects that implement
- this interface are #GtkFileChooserWidget and
- #GtkFileChooserDialog. You do not need to write an object that
- implements the #GtkFileChooser interface unless you are trying
- to adapt an existing file selector to expose a standard
- programming interface.
+ selection widgets. In GTK+, the main objects that implement this
+ interface are #GtkFileChooserWidget, #GtkFileChooserDialog, and
+ #GtkFileChooserButton. You do not need to write an object that
+ implements the #GtkFileChooser interface unless you are trying to
+ adapt an existing file selector to expose a standard programming
+ interface.
</para>
<refsect2 id="gtkfilechooser-encodings">
<!-- ##### SECTION See_Also ##### -->
<para>
- #GtkFileChooserDialog, #GtkFileChooserWidget
+ #GtkFileChooserDialog, #GtkFileChooserWidget, #GtkFileChooserButton
</para>
<!-- ##### STRUCT GtkFileChooser ##### -->
<!-- ##### SECTION Long_Description ##### -->
<para>
+The #GtkFileChooserButton is a widget that lets the user select a
+file. It implements the #GtkFileChooser interface. Visually, it is a
+file name with a button to bring up a #GtkFileChooserDialog.
+The user can then use that dialog to change the file associated with
+that button. This widget does not support setting the "select-multiple"
+property to %TRUE.
+</para>
+
+<example>
+<title>Create a button to let the user select a file in /etc</title>
+<programlisting>
+{
+ GtkWidget *button;
+
+ button = gtk_file_chooser_button_new (_("Select a file"));
+ gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER (button),
+ "/etc");
+}
+</programlisting>
+</example>
+
+<para>
+The #GtkFileChooserButton supports all four #GtkFileChooserAction<!--
+-->s that the #GtkFileChooser supports. Two of the actions,
+%GTK_FILE_CHOOSER_ACTION_SAVE and
+%GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER, give the button the appearance
+of an entry next to a button. The user can type the name of a file in
+this entry, and it will complete as it types. The other two actions,
+%GTK_FILE_CHOOSER_ACTION_OPEN and
+%GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER, make the #GtkFileChooserAction
+look like a #GtkButton.
+</para>
+<example>
+<title>Using GtkFileChooserButton in save mode</title>
+<programlisting>
+{
+ GtkWidget *button;
+
+ button = gtk_file_chooser_button_new (_("Save as..."));
+ gtk_file_chooser_set_action (GTK_FILE_CHOOSER (button),
+ GTK_FILE_CHOOSER_ACTION_SAVE);
+ gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER_BUTTON (button),
+ DEFAULT_SAVE_DIRECTORY);
+}
+</programlisting>
+</example>
+
+<important>
+<para>
+The #GtkFileChooserButton will ellipsize the label while in Open mode,
+and thus will thus request little horizontal space. To give the dialog
+more space, you should call gtk_widget_size_request(), or pack it in
+such a way that other interface elements give space to the widget.
</para>
+</important>
<!-- ##### SECTION See_Also ##### -->
<para>
-
+#GtkFileChooserDialog
</para>
<!-- ##### STRUCT GtkFileChooserButton ##### -->
<para>
+This should not be accessed directly. Use the accessor functions below.
+</para>
+
+
+<!-- ##### ARG GtkFileChooserButton:active ##### -->
+<para>
+%TRUE, if the #GtkFileChooserDialog associated with the button has been
+made visible. This can also be set by the application, though it is
+rarely useful to do so.
+</para>
+<!-- ##### ARG GtkFileChooserButton:dialog ##### -->
+<para>
+Instance of the #GtkFileChooserDialog associated with the button.
</para>
+<!-- ##### ARG GtkFileChooserButton:title ##### -->
+<para>
+Title to put on the #GtkFileChooserDialog associated with the button.
+</para>
<!-- ##### FUNCTION gtk_file_chooser_button_new ##### -->
<para>
<refsect2>
<title>Performance Considerations</title>
<para>
-Internally, the #GtkListStore is implemented with a linked list with a
-tail pointer. As a result, it is fast at data insertion and deletion,
-and not as fast at random data access. The #GtkListStore sets the
-#GTK_TREE_MODEL_ITERS_PERSIST flag, which means that #GtkTreeIter<!--
--->s can be cached while the row exists. Thus, if access to a
-particular row is needed often, it is worth keeping the iter around.
+Internally, the #GtkListStore was implemented with a linked list with a
+tail pointer prior to GTK+ 2.6. As a result, it was fast at data
+insertion and deletion, and not fast at random data access. The
+#GtkListStore sets the #GTK_TREE_MODEL_ITERS_PERSIST flag, which means
+that #GtkTreeIter<!-- -->s can be cached while the row exists. Thus, if
+access to a particular row is needed often and your code is expected to
+run on older versions of GTK+, it is worth keeping the iter around.
</para>
</refsect2>
@Returns:
+<!-- ##### FUNCTION gtk_init_with_args ##### -->
+<para>
+
+</para>
+
+@argc:
+@argv:
+@parameter_string:
+@entries:
+@translation_domain:
+@error:
+@Returns:
+
+
+<!-- ##### FUNCTION gtk_get_option_group ##### -->
+<para>
+
+</para>
+
+@open_default_display:
+@Returns:
+
+
<!-- ##### FUNCTION gtk_exit ##### -->
<para>
Terminates the program and returns the given exit code to the caller.
@Returns:
+<!-- ##### FUNCTION gtk_menu_tool_button_set_arrow_tooltip ##### -->
+<para>
+
+</para>
+
+@button:
+@tooltips:
+@tip_text:
+@tip_private:
+
+
</para>
@list:
+@info:
+
+
+<!-- ##### FUNCTION gtk_target_list_add_image_targets ##### -->
+<para>
+
+</para>
+
+@list:
+@info:
+@writable:
+
+
+<!-- ##### FUNCTION gtk_target_list_add_uri_targets ##### -->
+<para>
+
+</para>
+
+@list:
+@info:
<!-- ##### FUNCTION gtk_target_list_remove ##### -->
@Returns:
+<!-- ##### FUNCTION gtk_selection_data_set_pixbuf ##### -->
+<para>
+
+</para>
+
+@selection_data:
+@pixbuf:
+@Returns:
+
+
+<!-- ##### FUNCTION gtk_selection_data_get_pixbuf ##### -->
+<para>
+
+</para>
+
+@selection_data:
+@Returns:
+
+
+<!-- ##### FUNCTION gtk_selection_data_set_uris ##### -->
+<para>
+
+</para>
+
+@selection_data:
+@uris:
+@Returns:
+
+
+<!-- ##### FUNCTION gtk_selection_data_get_uris ##### -->
+<para>
+
+</para>
+
+@selection_data:
+@Returns:
+
+
<!-- ##### FUNCTION gtk_selection_data_get_targets ##### -->
<para>
@Returns:
+<!-- ##### FUNCTION gtk_text_buffer_backspace ##### -->
+<para>
+
+</para>
+
+@buffer:
+@iter:
+@interactive:
+@default_editable:
+@Returns:
+
+
<!-- ##### FUNCTION gtk_text_buffer_set_text ##### -->
<para>
@menu_item:
+<!-- ##### FUNCTION gtk_tool_item_rebuild_menu ##### -->
+<para>
+
+</para>
+
+@tool_item:
+
+
<link linkend="GtkEntry">
<inlinegraphic fileref="entry.png" format="PNG"></inlinegraphic>
</link>
- <link linkend="gtk-GtkFileChooserButton">
+ <link linkend="GtkFileChooserButton">
<inlinegraphic fileref="file-button.png" format="PNG"></inlinegraphic>
</link>
<link linkend="GtkFontButton">
create_file_button (void)
{
GtkWidget *vbox;
+ GtkWidget *vbox2;
GtkWidget *picker;
GtkWidget *align;
- vbox = gtk_vbox_new (FALSE, 3);
+ vbox = gtk_vbox_new (FALSE, 12);
+ vbox2 = gtk_vbox_new (FALSE, 3);
align = gtk_alignment_new (0.5, 0.5, 0.0, 0.0);
- picker = gtk_file_chooser_button_new ("File Button");
+ picker = gtk_file_chooser_button_new ("File Chooser Button");
gtk_widget_set_size_request (picker, 150, -1);
gtk_file_chooser_set_filename (GTK_FILE_CHOOSER (picker), "/etc/yum.conf");
gtk_container_add (GTK_CONTAINER (align), picker);
- gtk_box_pack_start (GTK_BOX (vbox), align, FALSE, FALSE, 0);
+ gtk_box_pack_start (GTK_BOX (vbox2), align, FALSE, FALSE, 0);
+ gtk_box_pack_start (GTK_BOX (vbox2),
+ gtk_label_new ("File Button (Open)"),
+ FALSE, FALSE, 0);
+
gtk_box_pack_start (GTK_BOX (vbox),
- gtk_label_new ("File Button"),
+ vbox2, TRUE, TRUE, 0);
+ gtk_box_pack_start (GTK_BOX (vbox),
+ gtk_hseparator_new (),
FALSE, FALSE, 0);
- return new_widget_info ("file-button", vbox, SMALL);
+ vbox2 = gtk_vbox_new (FALSE, 3);
+ align = gtk_alignment_new (0.5, 0.5, 0.0, 0.0);
+ picker = gtk_file_chooser_button_new ("File Chooser Button");
+ gtk_file_chooser_set_action (GTK_FILE_CHOOSER (picker),
+ GTK_FILE_CHOOSER_ACTION_SAVE);
+ gtk_widget_set_size_request (picker, 150, -1);
+ gtk_file_chooser_set_filename (GTK_FILE_CHOOSER (picker), "/etc/yum.conf");
+ gtk_container_add (GTK_CONTAINER (align), picker);
+ gtk_box_pack_start (GTK_BOX (vbox2), align, FALSE, FALSE, 0);
+ gtk_box_pack_start (GTK_BOX (vbox2),
+ gtk_label_new ("File Button (Save)"),
+ FALSE, FALSE, 0);
+ gtk_box_pack_start (GTK_BOX (vbox),
+ vbox2, TRUE, TRUE, 0);
+
+ return new_widget_info ("file-button", vbox, MEDIUM);
}
static WidgetInfo *